#include "Ogre7zArchiveFactory.h"

#include "Ogre7zArchive.h"

namespace Ogre
{

//-------------------------------------------------------------------------------------------------------------------------------------------------
SevenZipArchiveFactory::SevenZipArchiveFactory()
{
}

//-------------------------------------------------------------------------------------------------------------------------------------------------
SevenZipArchiveFactory::~SevenZipArchiveFactory()
{
}

//-------------------------------------------------------------------------------------------------------------------------------------------------
const String& SevenZipArchiveFactory::getType() const
{
	static const String sFactoryName = "7zip";
	return sFactoryName;
}

//-------------------------------------------------------------------------------------------------------------------------------------------------
Archive* SevenZipArchiveFactory::createInstance( const String& name )
{
	return OGRE_NEW_T( SevenZipArchive, MEMCATEGORY_GENERAL )( name, "7zip" );
}

//-------------------------------------------------------------------------------------------------------------------------------------------------
void SevenZipArchiveFactory::destroyInstance( Archive* arch )
{
	OGRE_DELETE_T( static_cast<SevenZipArchive*>(arch), SevenZipArchive, MEMCATEGORY_GENERAL );
}

} // end of namespace Ogre
